package cn.tedu.boot311.controller;

import cn.tedu.boot311.mapper.EmpMapper;
import cn.tedu.boot311.vo.Emp;
import org.apache.catalina.mapper.Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.ws.Action;

@RestController
public class EmpController {
    @Autowired(required = false)
    EmpMapper mapper;
    @RequestMapping("/insert")
    public String insert(Emp emp){
        mapper.insert(emp);
        return "添加完成";
    }
}
